package com.example.demo.MD5Test;

import com.example.demo.MD5Test.util.Md5Util;
import org.apache.commons.codec.digest.DigestUtils;

public class Md5Controller {
    public static void main(String[] args) {
        String keyword="HaHaHaHaHaHa";

        String md5= DigestUtils.md5Hex(keyword);
        System.out.println("md5加密后："+"\n"+md5);

        String md5salt= Md5Util.md5PlusSalt(keyword);
        System.out.println("加盐后："+"\n"+md5salt);

        String word= Md5Util.md5MinusSalt(md5salt);
        System.out.println("解密后："+"\n"+word);


    }
}
